package systemActions;

/**
 * Created with IntelliJ IDEA.
 * User: xpk
 * Date: 11/12/13
 * Time: 4:43 PM
 * To change this template use File | Settings | File Templates.
 */
public abstract class SystemActionsFactory {
    public static SystemAction wrapWithAction(String type, SystemAction currentSystemAction) {
        if(type.equals("UsersRegistration")) {
            return new UsersRegistration(currentSystemAction);
        }
        if(type.equals("PreparationOfQuestions")) {
            return new PreparationOfQuestions(currentSystemAction);
        }
        throw new RuntimeException("Bad UserAction creation: ");
    }

    public static SystemAction getBaseComponent(String type) {
        if(type.equals("UserWorkbench")) {
            return new UserWorkbench();
        }
        throw new RuntimeException("Bad UserAction creation: ");
    }

}




